<?
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="data.csv"'); 
?>
<? if(count($list)) { ?><? foreach($list[0] as $idx => $value) { ?>"<?= mb_convert_encoding($idx,'sjis','utf8'); ?>",<? } ?>	
<? foreach($list as $row => $col) { ?>
<? foreach($col as $idx => $value) if( substr($value,0,4) != 'http') { ?>"<?= mb_convert_encoding($value,'sjis','utf8'); ?>",<? } else {?>"",<? } ?>

<? } ?><? } ?>
